package com.mco.socket.bio;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * @author ：liao.wei
 * @date ：2023/10/7 14:48
 * @package : com.mco.socket.read
 */
public class RedisClient02 {
	public static void main(String[] args) throws IOException {
		Socket socket = new Socket("127.0.0.1", 6688);
		OutputStream outputStream = socket.getOutputStream();
		
		while (true) {
			Scanner scanner = new Scanner(System.in);
			String s = scanner.next();
			if (s.equalsIgnoreCase("quit")) {
				break;
			}
			socket.getOutputStream().write(s.getBytes());
			System.out.println("=---Redis client 01 写入完成----= ");
		}
		outputStream.close();
		socket.close();
	}
}
